package com.lmaye.design.patterns.ood.dip.deliveryMode;

/**
 * -- 测试
 *
 * <pre>
 *     传递依赖关系的三种传递方式
 *     1. 接口传递；
 *     2. 构造方法传递；
 *     3. set方法传递；
 * </pre>
 *
 * @author lmay.Zhou
 * @date 2020/11/12 17:41 星期四
 * @qq 379839355
 * @email lmay@lmaye.com
 * @since JDK1.8
 */
public class Test {
    public static void main(String[] args) {
        // 接口传递
        Mate40 mate40 = new Mate40();
        InterfaceDeliveryImpl interfaceDelivery = new InterfaceDeliveryImpl();
        interfaceDelivery.delivery(mate40);
        // 构造方法传递
        ConstructorDelivery constructorDelivery = new ConstructorDelivery(mate40);
        constructorDelivery.delivery();
        // Set方法传递
        SetterDelivery setterDelivery = new SetterDelivery();
        setterDelivery.setMobile(mate40);
        setterDelivery.delivery();
    }
}
